 //**************************************************
 // PP51.java          Author:20172323wyh
 //
 // Determine whether the entered year is leap year.
 //**************************************************
 
 import java.util.Scanner;

 public class PP51
 {
    //-----------------------------------------------
    // Entered the year and prints result.
    //-----------------------------------------------
    public static void main(String[] args)
    {
       Scanner scan = new Scanner(System.in);

       System.out.print("Enter the yearz: ");
       int year = scan.nextInt();
       System.out.println();
       
       if (year < 1582)
          System.out.println("Unfairly input");
       else
          if ((year%4) == 0)
             {
              if ((year%100) != 0 || ((year%100) == 0 && (year%400) == 0) )
                 System.out.println("This is a leap year");
              else
                 System.out.println("This isn't a leap year");
             }
          else 
                System.out.println("This isn't a leap year");
     }
 }

           
